<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>说明文件</title>
    <link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css">
    <!--[if lt IE 9]>
    <script src="//cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="//cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <style>
body {

    margin-top: 70px;
}
.content p{
    padding: 15px;
}
/*#main{*/
    /*height: 100%;*/
    /*overflow:auto;*/
/*}*/
.content{

}
#navbar-content{
    position: fixed;
}
    </style>
</head>
<body>
<nav class="navbar navbar-inverse navbar-fixed-top">
    <div class="container-fluid">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="{:url('/readme/index')}">说明文档</a>
        </div>
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav" id="hlink">
                <li><a href="{:url('readme/index/codingke')}">扣丁学堂</a></li>
                <li><a href="{:url('readme/index/maiziedu')}">麦子学院</a></li>
                <li><a href="{:url('readme/index/jikexueyuan')}">极客学院</a></li>
                <li><a href="{:url('readme/index/mp4ba')}">Mp4ba</a></li>
            </ul>
        </div>
    </div>
</nav>
<div id="main">
{notempty name="mod"}
    {switch name="mod"}
    {case value="codingke"}{include file="index/codingke"}{/case}
    {case value="maiziedu"}{include file="index/maiziedu"}{/case}
    {case value="jikexueyuan"}{include file="index/jikexueyuan"}{/case}
    {case value="mp4ba"}{include file="index/mp4ba"}{/case}
    {/switch}
{/notempty}
</div>
<script src="//cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
<script src="//cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<script>
$(function () {
    $("#hlink a").click(function(e){
        var href = $(this).attr('href');
        window.history.pushState({},0,'http://'+window.location.host+href);
        $.get(href,function (res) {
            $('#main').html(res);
            play('video');
        });
        e.preventDefault();
    });
    $('body').on('click','#navbar-content a', function(e) {
        $("html, body").animate({
            scrollTop: $($(this).attr("href")).offset().top-70 + "px"
        }, {
            duration: 500,
            easing: "swing"
        });
        return false;
    });
})
</script>
</body>
</html>